package bancosys.tec.services.implementor;

import jmine.tec.di.resolver.ObjectResolver;
import jmine.tec.di.type.TypeConverter;

import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.transaction.PlatformTransactionManager;

import bancosys.tec.services.implementor.descriptor.DependencyDescriber;
import bancosys.tec.services.implementor.descriptor.ServiceDescriptor;

/**
 * Runtime para a preparacao de servicos
 * 
 * @author MarceloT
 */
public interface ServiceImplementorRuntime extends ServiceDescriptor, BeanFactoryAware {

    /**
     * Registra uma possivel dependencia
     * 
     * @param resolver {@link ObjectResolver}
     */
    void registerResolver(ObjectResolver resolver);

    /**
     * Adiciona uma dependencia estatica
     * 
     * @param resolvable {@link Object}
     */
    void registerStaticResolvable(Object resolvable);

    /**
     * Registra um novo conversor de tipos
     * 
     * @param converter o conversor de tipos
     */
    void registerTypeConverter(TypeConverter<?> converter);

    /**
     * @return the {@link PlatformTransactionManager}
     */
    PlatformTransactionManager getTransactionManager();

    /**
     * Devolve o {@link DependencyDescriber} usado para ver as dependencias
     * 
     * @return {@link DependencyDescriber}
     */
    DependencyDescriber getDependencyDecriber();
}
